//
//  StatisticsManager.m
//  YJAPPThird
//
//  Created by 张吉旭 on 16/12/20.
//  Copyright © 2016年 yj. All rights reserved.
//

#import "StatisticsManager.h"
#import <UMMobClick/MobClick.h>


static StatisticsManager * instance = nil;

@implementation StatisticsManager

+(StatisticsManager*)shareInstance{
    static dispatch_once_t once_Token;
    dispatch_once(&once_Token, ^{
        instance = [[StatisticsManager alloc] init];
    });
    
    return instance;
}



//页面统计开始
-(void)beginLogPageView:(NSString *)pageName{
    [MobClick beginLogPageView:pageName];
}


//页面统计结束
-(void)endLogPageView:(NSString *)pageName{
    [MobClick endLogPageView:pageName];
}

-(void)setEncryptEnabled:(BOOL)value{
    [MobClick setEncryptEnabled:value];
}

-(void)event:(NSString *)eventId{
    [MobClick event:eventId];
}
-(void)event:(NSString *)eventId label:(NSString *)label{
    [MobClick event:eventId label:label];
}
-(void)event:(NSString *)eventId attributes:(NSDictionary *)attributes{
    [MobClick event:eventId attributes:attributes];
}
-(void)event:(NSString *)eventId attributes:(NSDictionary *)attributes counter:(int)number{
    [MobClick event:eventId attributes:attributes counter:number];
}

-(void)event:(NSArray *)keyPath value:(int)value label:(NSString *)label{
    
}

/** active user sign-off.
 停止sign-in PUID的统计
 */
-(void)profileSignOff{
    [MobClick profileSignOff];
}

- (void)profileSignInWithPUID:(NSString *)puid
{
    [MobClick profileSignInWithPUID:puid];
}

- (void)profileSignInWithPUID:(NSString *)puid provider:(NSString *)provider{
    [MobClick profileSignInWithPUID:puid provider:provider];
}

@end
